home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / basic / const.rdm < prev    next >
Text File  |  1996-05-20  |  1KB  |  33 lines

  1. Short:    Enum style, lists to constants
  2. Author:   Braneloc@mirex.demon.co.uk
  3. Uploader: Braneloc@mirex.demon.co.uk
  4. Type:     dev/basic
  5.  
  6. Ultra small program for converting lists of things into constant lists for
  7. HiSoft Basic 2, a bit like enums, but const is much nicer :-)
  8.  
  9. First make a nice list of anything you want to turn into a list of stuff.
  10. This list can contain anything, but make sure it is all valid as variable
  11. names.  You do not need to include any nasty '%' signs.  I really hate
  12. typing them.
  13.  
  14. Then run 'constant-ize <filename>' and a few seconds later you will suddenly
  15. have a couple of new files in the same directory.
  16.  
  17. '<filename>_h.bas' is the real file of usefullness.  It contains the list of
  18. constants you want to include in your program.  You can then do stuff
  19. without remembering tedious stuff like offsets.
  20.  
  21. '<filename>_sub.bas' is a quick subroutine that may come in handy.  I like
  22. loading a string array with the same contents as the constants so I can
  23. print what it is without doing a million 'if' statements.
  24.  
  25.  _   _   _        _     _   _     |  Ferengi Rule of Acquisition #202
  26. |_> |_| |_| |\ | |_ |  | | /   |  |  
  27. |_> | \ | | | \| |_ |_ |_| \_  .  |  The justification for profit is profit.
  28.                                   |  
  29. Please email me at: Braneloc@mirex.demon.co.uk
  30.                                
  31. Alternative email: Braneloc@draught.demon.co.uk (DraughtFlow BBS,
  32. 01707 328484, free internet email, 16 CD's online, no download limit..)
  33.